<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>前台</title>
    <meta charset="utf-8"/>
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}">
    <link rel="stylesheet" th:href="@{/css/bootstrap.min.css}">
    <link rel="stylesheet" th:href="@{/semantic/semantic.min.css}"/>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
</head>
<body class="layui-layout-body">
<div style="margin:50px 50px 50px 50px">
    <form class="layui-form layui-form-pane" lay-filter="clientInfo" id="clientFrom">
        <div class="layui-form-item">
            <label class="layui-form-label"><i class="ui blue book icon"></i>客户姓名</label>
            <div class="layui-input-block">
                <input disabled type="text" name="clientName" placeholder="请输入客户名" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><i class="ui blue book icon"></i>客户电话</label>
            <div class="layui-input-block">
                <input disabled type="text" name="clientContact" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">

            <label class="layui-form-label"><i class="ui violet user outline icon"></i>客户手机</label>
            <div class="layui-input-block">
                <input disabled type="text" name="clientPhone" class="layui-input">
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label"><i class="ui violet user outline icon"></i>客户QQ</label>
                <div class="layui-input-block">
                    <input disabled type="text" name="clientQq" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label"><i class="ui violet user outline icon"></i>客户邮箱</label>
                <div class="layui-input-block">
                    <input disabled type="text" name="clientMail" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">

                <label class="layui-form-label"><i class="ui violet user outline icon"></i>一级单位</label>
                <div class="layui-input-block">
                    <input disabled type="text" name="firstUnit" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label"><i class="ui violet user outline icon"></i>三级单位</label>
                <div class="layui-input-block">
                    <input disabled type="text" name="secondUnit" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label"><i class="ui violet user outline icon"></i>三级单位</label>
                <div class="layui-input-block">
                    <input disabled type="text" name="thirdUnit" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
    </form>
</div>
<script type="text/javascript" th:src="@{/js/jquery-3.4.1.min.js}"></script>
<script type="text/javascript" th:src="@{/semantic/semantic.min.js}"></script>
<script type="text/javascript" th:src="@{/layui/layui.js}"></script>
<script type="text/javascript" th:src="@{/js/upload.js}"></script>
<script th:inline="javascript">
    layui.use(['form', 'jquery', 'layedit', 'laydate'], function () {
        const form = layui.form
            , layer = layui.layer
            , $ = layui.jquery;
        form.render('select');
        const client = [[${client}]];//得到model中的client
        form.val('clientInfo', {
            "clientName": client.clientName // "name": "value"
            , "clientContact": client.clientContact
            , "clientPhone": client.clientPhone
            , "clientQq": client.clientQq
            , "clientMail": client.clientMail
            , "firstUnit": client.firstUnit
            , "secondUnit": client.secondUnit
            , "thirdUnit": client.thirdUnit
        });
    });
</script>
</body>
</html>